<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        /*这里加入important,变成了最高优先级*/
        p{
            color: green !important;
        }
        #d1{
          color: red;
        }
        #p1{
            color: blue;
        }
    </style>
</head>
<body>
<!--优先级顺序:!important>id>class>标签>继承-->
<p id="p1">p1</p>
<div id="d1">
    <P>p2</P>
    <span>span</span>
    <a href="">超链接</a>
</div>
</body>
</html>